from celery import shared_task
from utils.sendmsg import send_message
import logging

logger = logging.getLogger('django')

@shared_task
def add(x, y):
    print('hello')
    return x + y


@shared_task
def send(mobile,code):
    try:
        return send_message(mobile, code)
    except Exception as e:
        logger.error(f"发送短信失败{e}")
